//
//  MSFilterNormalCell.m
//  MSJD
//
//  Created by 箭军刘 on 2018/11/8.
//  Copyright © 2018 xiangbo. All rights reserved.
//

#import "MSFilterNormalCell.h"

@interface MSFilterNormalCell()

@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *numberLabel;
@property (weak, nonatomic) IBOutlet UIView *lineView;

@end

@implementation MSFilterNormalCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
}

- (void)refreshFilterNormalCellWithDictionary:(NSDictionary *)content {
    NSString *name = @"";
    NSString *number = @"";
    if (![MSSafeObject isNull:content]) {
        if (content[@"title"]) {
           name = [MSSafeObject stringInfo:content[@"title"]];
        } else {
            name = [MSSafeObject stringInfo:content[@"name"]];
        }
        number = [MSSafeObject stringInfo:content[@"count"]];
    }
    self.nameLabel.text = name;
    self.numberLabel.text = number;
}

- (void)changeCellSelectStatus:(BOOL)isSelect {
    if (isSelect) {
        // 选中状态
        self.nameLabel.textColor = MSThemeColor;
        self.lineView.backgroundColor = MSThemeColor;
    } else {
        self.nameLabel.textColor = [UIColor colorWithHexString:@"#444444"];
        self.lineView.backgroundColor = [UIColor colorWithHexString:@"#888888"];
    }
}

#pragma mark -  Memory Method

- (void)dealloc {
    NSLog(@"%s", __func__);
}

@end
